<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8"%>
<!DOCTYPE HTML>
<html xmlns:th="http://www.thymeleaf.org" lang="">
<head>
    <title>登录页面</title>
    <meta http-equiv=Content-Type content="text/html; charset=utf-8">
    <link href="${pageContext.request.contextPath}/css/style.css"
          type=text/css rel=stylesheet>
    <!-- Bootstrap Core CSS -->
    <link href="${pageContext.request.contextPath}/css/bootstrap.min.css" rel="stylesheet" />
    <script src=
                    "${pageContext.request.contextPath}/js/jquery-1.11.3.min.js">
    </script>

    <script>
        // 判断是登录账号和密码是否为空
        function check(){
            var username = $("#username").val();
            var password = $("#password").val();
            if(username=="" || password==""){
                $("#message").text("账号或密码不能为空！");
                return false;
            }
            return true;
        }
    </script>
</head>
<style>
    input{
        outline-style: none ;
        border: 1px solid #ccc;
        border-radius: 3px;
        width: 300px;
        font-size: 18px;
    }
    input:focus{
        border-color: #66afe9;
        outline: 0;
        -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6);
        box-shadow: inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6)
    }
</style>
<body style=" background-repeat:no-repeat ;background-size:100% 100%; background-attachment: fixed;" align="center"
      background="${pageContext.request.contextPath}/resources/images/1.jpg">
<div ALIGN="center">
    <table border="0" width="100%" cellspacing="0" cellpadding="0"
           id="table1">
        <tr>
            <td height="93"></td>
            <td></td>
        </tr>
        <tr>

            <td class="login_msg" width="100%" align="center">
                <!-- margin:0px auto; 控制当前标签居中 -->
                <fieldset style="width: 70%; margin: 0px auto;">
                    <legend>
                        <font style="font-size:25px" face="宋体">
                            网络订票系统
                        </font>
                    </legend>
                    <font color="red">
                        <%-- 提示信息--%>
                        <span id="message">${msg}</span>
                    </font>
                    <form action="${pageContext.request.contextPath}/user/login"
                          method="post" onsubmit="return check()" class="form-horizontal">
                        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br /><br />
                        账号：<input id="account" type="text" name="account" required/>
                        <br /><br />
                        密码：<input id="password" type="password" name="password" required/>
                        <br /><br />
                        &nbsp;&nbsp;&nbsp;&nbsp;
                        <input type="submit" value="登录" class="btn btn-primary" />
                    </form>
                    <button type="button" class="btn btn-primary" style="background:#b3f2ff;margin:1% 0% 0% 5%"><a href="${pageContext.request.contextPath}/user/regUser">注册</a></button>
                </fieldset>
            </td>
        </tr>
    </table>
</div>
</body>
</html>
